package com.example.librarymanagement.exception;

import com.example.librarymanagement.result.IResultCode;
import lombok.Getter;
import org.springframework.security.core.AuthenticationException;

/**
 * 验证异常
 * @author fgba
 */
@Getter
public class CaptchaException extends AuthenticationException {
    public IResultCode resultCode;

    public CaptchaException(IResultCode errorCode) {
        super(errorCode.getMsg());
        this.resultCode = errorCode;
    }

    public CaptchaException(String msg) {
        super(msg);
    }
}
